package com.zeei.ems.meet.controller;

import com.zeei.ems.base.constant.GlobalConstant;
import com.zeei.ems.base.controller.BasicController;
import com.zeei.ems.base.result.ResultRowsVO;
import com.zeei.ems.meet.model.DataRtVO;
import com.zeei.ems.meet.model.EquipVO;
import com.zeei.ems.meet.model.dto.DataRtDto;
import com.zeei.ems.meet.model.vo.DataRtParam;
import com.zeei.ems.meet.model.vo.EquipParam;
import com.zeei.ems.meet.service.DataRtService;
import com.zeei.ems.meet.service.EquipService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "应急监测数据接口")
@RestController
@RequestMapping("/ems/data")
public class DataRtController extends BasicController {
    @Autowired
    DataRtService dataRtService;

    /**
     * 查询应急监测数据列表
     * @param dataRtParam 应急监测数据列表
     * @return 返回应急监测数据列表
     */
    @ApiOperation(value = "查询应急监测数据列表")
    @PostMapping("/list")
    public ResultRowsVO<DataRtDto> listDataRt(@RequestBody DataRtParam dataRtParam){
        List<DataRtDto> dataRtList = dataRtService.listDataRt(dataRtParam);
        return this.createResultRowsVO(dataRtList, GlobalConstant.SUCCEED, dataRtList.size());
    }
}
